home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / ip / sized_io.shar / Makefile < prev    next >
Encoding:
Makefile  |  1990-06-29  |  2.3 KB  |  90 lines

  1. COMMON = stream.o sized_io.o
  2. OFILES = $(COMMON) reader.o writer.o
  3. HFILES = inet.h
  4.  
  5. # disable -mc68020 flag with following
  6. TARGET_ARCH=
  7.  
  8. # set for the OS you are compiling for.  Due to incompatibility with
  9. # <netdb.h>, it is impossible to produce object files from one OS that
  10. # link with another.  Specifically, it is the change in hostent which
  11. # occurred transitioning from 3.0 to 4.0.
  12. OS=4.0
  13.  
  14. #FD_SET_SIZE = set to 32 if old-style, otherwise comment out
  15. # Sun
  16. CFLAGS = -mc68010 -g -Bstatic -DFD_SET_SIZE=32
  17. # choose any of the following as appropriate
  18. #CFLAGS = -mc68010 -g -DDEBUG -DFD_SET_SIZE=32
  19. # Silicon Graphics
  20. CFLAGS = -I/usr/include/bsd -DFD_SET_SIZE=32
  21.  
  22. LFLAGS = -Bstatic -L/lib.MC68010 -L/usr.MC68010/lib
  23.  
  24. # Sun
  25. LIB = libstream$(OS).a
  26. # Silicon Graphics
  27. #LIB = libstream$(OS).a -lbsd
  28.  
  29. # if you don't need to do ranlib (i.e. SV, Silicon Graphics)
  30. # change following to "RANLIB = echo"
  31. RANLIB = ranlib
  32.  
  33. # for testing purposes
  34.  
  35. test: $(LIB) reader writer reader-auto writer-auto
  36.  
  37. $(LIB): stream.o sized_io.o
  38.     ar cr $(LIB)  `lorder $(COMMON) | tsort` 
  39.     $(RANLIB) $(LIB)
  40.  
  41. cleanup:
  42.     rm $(OFILES) $(LIB)
  43.  
  44. install: $(LIB) makedirs
  45.     cp $(HFILES) /usr/local/include/inet/stream
  46.     cp $(LIB) /usr/local/lib
  47.     $(RANLIB) /usr/local/lib/$(LIB)
  48.     cp stream.3 /usr/local/man/manl/sized_io.l
  49.  
  50. makedirs: /usr/local/include/inet /usr/local/include/inet/stream
  51.  
  52. /usr/local/include/inet:
  53.     mkdir /usr/local/include/inet
  54.  
  55. /usr/local/include/inet/stream:
  56.     mkdir /usr/local/include/inet/stream
  57.  
  58. lint:
  59.     lint -u stream.c sized_io.c
  60.  
  61. lintc:
  62.     lint -Cstream stream.c sized_io.c
  63.     # must be su to execute rest of this
  64.     mv llib-lstream.ln /usr/lib/lint
  65.     chown libes /usr/lib/lint/llib-lstream.ln
  66.  
  67. stream.o: inet.h
  68.  
  69. reader: reader.o $(COMMON) inet.h
  70.     cc $(LFLAGS) -o reader reader.o $(LIB)
  71.  
  72. writer:    writer.o $(COMMON) inet.h
  73.     cc $(LFLAGS) -o writer writer.o $(LIB)
  74.  
  75. reader-auto: reader-auto.o $(COMMON) inet.h
  76.     cc $(LFLAGS) -o reader-auto reader-auto.o $(LIB)
  77.  
  78. writer-auto:    writer-auto.o $(COMMON) inet.h
  79.     cc $(LFLAGS) -o writer-auto writer-auto.o $(LIB)
  80.  
  81. ftp:    sized_io.shar.Z
  82.     rcp sized_io.shar.Z durer:~ftp/pub/sized_io.shar.Z
  83.     rm sized_io.shar.Z
  84.  
  85. sized_io.shar.Z:    sized_io.shar
  86.     compress sized_io.shar
  87.  
  88. sized_io.shar:
  89.     shar Makefile README sized_io.ps inet.h reader-auto.c reader.c sized_io.c stream.3 stream.c writer-auto.c writer.c > sized_io.shar
  90.